package type.proxy;

/**
 * @Date 2021/5/2 10:20 上午
 * @Author dengxin
 */
public class ProxyObject implements DoSomething {

    private DoSomething proxied;

    public ProxyObject(DoSomething proxied) {
        this.proxied = proxied;
    }

    @Override
    public void doSomething() {
        System.out.println("Proxy Object do something");
        proxied.doSomething();
    }

    @Override
    public void doSomethingElse(String args) {
        System.out.println("Proxy Object do something else : " + args);
        proxied.doSomethingElse(args);
    }
}
